/**
 * Created by walkman on 2017/6/20.
 */
angular.module('WfbPlatformApp').controller('HomeController', function ($rootScope, $scope, $http, $timeout) {
  //模拟的json数据
  jQuery.ajax({
    url: '/goods/list',
    type: 'post',
    async: false,
    success: function (json) {
      if (json.retCode == 1) {
        $scope.datalist = json.data;
      } else {
        console.log(json.retMsg);
      }
    }
  });

  //模拟的json数据
  jQuery.ajax({
    url: '/transaction/getPoint',
    type: 'post',
    async: false,
    success: function (json) {
      if (json.retCode == 1) {
        $scope.points = json.data;
        console.log("积分数据：" + json)
      } else {
        console.log(json.retMsg);
      }
    }
  });
  //
  $scope.$on('$viewContentLoaded', function () {
    // initialize core components
  });
});
